package com.hilaver.dzmis.service.impl;

import com.hilaver.dzmis.basicinfo.BiFranceCustomerEshop;
import com.hilaver.dzmis.service.AbstractBaseService;
import com.hilaver.dzmis.service.IEntityService;

public class BiFranceCustomerEshopServiceImpl extends AbstractBaseService implements
		IEntityService {
	
	@Override
	public String edit(Object obj) throws Exception {
		BiFranceCustomerEshop customer = (BiFranceCustomerEshop)obj;
		String operation = null;
		if(customer.getId() != null){
			operation = "02";
		}else{
			operation = "01";
		}
		this.dao.saveOrUpdate(obj);
		super.editSysMbox(obj, operation);
		return "{success: true}";
	}
	
	@Override
	public String delete(int id) throws Exception {
		super.editSysMbox(BiFranceCustomerEshop.class.getName(), id);
		return super.delete(BiFranceCustomerEshop.class.getName(), id);
	}
	
	@Override
	public String get(int id) throws Exception {
		return super.get(BiFranceCustomerEshop.class.getName(), id);
	}
		
	@Override
	public String getAllPagination(int page, String sort, String order)
			throws Exception {
		return super.getAllPagination(BiFranceCustomerEshop.class.getName(), page, sort, order);
	}
	
	public String getAllPagination(int page, String sort, String order, String[] filters)
			throws Exception {
		return super.getAllPagination(BiFranceCustomerEshop.class.getName(), page, sort, order, filters);
	}
		
	public String getAll(String sort, String order) throws Exception{
		return super.getAll(BiFranceCustomerEshop.class.getName(), sort, order);
	}
	
	public BiFranceCustomerEshop getObj(int id) throws Exception {
		return (BiFranceCustomerEshop)super.getObj(BiFranceCustomerEshop.class.getName(), id);
	}

}
